From 880ad7b709f9154517a4d4bc858e1001e88c7570 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 21 Jan 2010 05:01:33 +0000 Subject: [PATCH] Add wintec_test format for Wintec WBT-202 GPS mass storage files. --- Makefile.in | 2 +- reference/track/wintec_tes.tes | Bin 0 -> 7968 bytes reference/track/wintec_tes~gpx.gpx | 2006 ++++++++++++++++++++++++++++ testo.d/wintec_tes.test | 6 + vecs.c | 7 + wintec_tes.c | 104 ++ xmldoc/formats/wintec_tes.xml | 26 + 7 files changed, 2150 insertions(+), 1 deletion(-) create mode 100755 reference/track/wintec_tes.tes create mode 100644 reference/track/wintec_tes~gpx.gpx create mode 100644 testo.d/wintec_tes.test create mode 100644 wintec_tes.c create mode 100644 xmldoc/formats/wintec_tes.xml diff --git a/Makefile.in b/Makefile.in index 75e0631d2..3caab7882 100644 --- a/Makefile.in +++ b/Makefile.in @@ -64,7 +64,7 @@ ALL_FMTS=$(MINIMAL_FMTS) gtm.o gpsutil.o pcx.o cetus.o copilot.o \ igo8.o gopal.o humminbird.o mapasia.o gnav_trl.o navitel.o ggv_ovl.o \ jtr.o sbp.o sbn.o mmo.o skyforce.o itracku.o v900.o delbin.o \ pocketfms_bc.o pocketfms_fp.o pocketfms_wp.o naviguide.o enigma.o \ - vpl.o teletype.o jogmap.o bushnell.o bushnell_trl.o \ + vpl.o teletype.o jogmap.o bushnell.o bushnell_trl.o wintec_tes.o \ FMTS=@FMTS@ diff --git a/reference/track/wintec_tes.tes b/reference/track/wintec_tes.tes new file mode 100755 index 0000000000000000000000000000000000000000..f8bae485aab0a8834b0b933795404b2232b51605 GIT binary patch literal 7968 zcmYk>dz?@8zQ^$uel8_u%Vu<2KRcolvqep})6ypDxcp`&HHrM(YN(w{(xA4bs6i() zc9>FGy6E>SG9=VgXUV3i&>)$LT5^d>dk$@T)G6on`Mu|l^XK#N`Fy|YdtbLRoGbTr z?-U$OyPcOOVplm091lldq}`%d60zS;J5H~9$BCN<;pFbLTl!ie_6r_v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BV5GyFl&FxJdf+~z0BfoVEdky!}m1vT8ra|?``IHaKQJsa=yoz zH{)^#^z8`x}Gk<(PG=GQV3)v5RUo;=X z$wk!1_eb*y>@TK2<5k}&9G0^l#>x$k;Afbx(ejx%zJ&3-r;cP{I0WtN3Uuznb;eMlQ1aHMEEC<#zqC*uy!kM|+#d#g>nc zG?u4fA6LiZ={Um0_4X})J?*deqZY?mjWi!~%x}}4)B65D7suaW|JMHxD7APc*XMtM zwYLmA@3J223s;SA#CR{nkZdt83j%HyW|kFfZQIJuGhA5=b#gH7z0!*Ye? zZ>Bx_<+rf^A^qiliCsUm@*i>D?~ym-5a;s$#o}9VfJ^v4W3H;t&)T8>ePa1ltatwB z*m~b-`PA?6zsLR$?7?>ZT>b}He6QvIgZ;_>B0ImoskisOydOK{7rrYWz&` zTWHS)`3Uy7UN--$tiD=o|EqldXPN6Pe>?karQGN!`8!$PY5o6cg8g00M@nvvgWZfT z|I_TeI2*@5=X(5aGiTv&59{+KxfPCTnBRJzXZicMpDtB@&&Nqz{erIF0S6J+dsgFl z84kateNQK14H(}pR{j9{2iyO+D=hyY{h2TK#1VF$lCQS%hZx^^vS;~+S+8^CJ{JFu z`FLFQ-(uyDu>T*^^#_^1r@U|Lsew~q{(<&BqIhAwgX!{}*eBn?HXcK;4{|$NbR3895Vk2Y~#Pg@;~Lg8Ls(z1;@8?p4_GS zR#-mky&tyqwbt@k&xJ!3|G*s5zB?4(iXHZIa&RK^{;?AWoCh^|iP$O1@5OeWza`qKJ$ + + + + + + + 55.000000 + + + + -2.000000 + + + + -2.000000 + + + + -6.000000 + + + + 8.000000 + + + + 9.000000 + + + + 3.000000 + + + + 8.000000 + + + + 10.000000 + + + + 14.000000 + + + + 9.000000 + + + + 8.000000 + + + + 6.000000 + + + + 5.000000 + + + + 5.000000 + + + + 4.000000 + + + + 3.000000 + + + + 3.000000 + + + + -1.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -4.000000 + + + + -4.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -6.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -3.000000 + + + + -3.000000 + + + + -4.000000 + + + + -3.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -3.000000 + + + + -3.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -3.000000 + + + + -4.000000 + + + + -4.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -5.000000 + + + + -4.000000 + + + + -4.000000 + + + + -4.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -4.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + 0.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -4.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + 0.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + 0.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + -1.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + 0.000000 + + + + 0.000000 + + + + 1.000000 + + + + 1.000000 + + + + 1.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + -2.000000 + + + + -3.000000 + + + + -5.000000 + + + + -3.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -2.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -1.000000 + + + + -3.000000 + + + + -2.000000 + + + + 0.000000 + + + + 2.000000 + + + + 3.000000 + + + + 3.000000 + + + + 3.000000 + + + + 3.000000 + + + + 3.000000 + + + + 2.000000 + + + + 0.000000 + + + + 1.000000 + + + + 0.000000 + + + + 0.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + 0.000000 + + + + -1.000000 + + + + -1.000000 + + + + -2.000000 + + + + 0.000000 + + + + -1.000000 + + + + 1.000000 + + + + 2.000000 + + + + -3.000000 + + + + 0.000000 + + + + -2.000000 + + + + 0.000000 + + + + -2.000000 + + + + -4.000000 + + + + -7.000000 + + + + -10.000000 + + + + -7.000000 + + + + -5.000000 + + + + -2.000000 + + + + -3.000000 + + + + -5.000000 + + + + -3.000000 + + + + 0.000000 + + + + 2.000000 + + + + 1.000000 + + + + 0.000000 + + + + 0.000000 + + + + -1.000000 + + + + -2.000000 + + + + -2.000000 + + + + -3.000000 + + + + -3.000000 + + + + -5.000000 + + + + -4.000000 + + + + -1.000000 + + + + + diff --git a/testo.d/wintec_tes.test b/testo.d/wintec_tes.test new file mode 100644 index 000000000..48a1d5ee2 --- /dev/null +++ b/testo.d/wintec_tes.test @@ -0,0 +1,6 @@ +rm -f ${TMPDIR}/wintec_tes.* + +# Currently one-way. +gpsbabel -i wintec_tes -f ${REFERENCE}/track/wintec_tes.tes -o gpx -F ${TMPDIR}/wintec_tes.gpx +compare ${REFERENCE}/track/wintec_tes~gpx.gpx ${TMPDIR}/wintec_tes.gpx + diff --git a/vecs.c b/vecs.c index 03cc09e95..1d1f51504 100644 --- a/vecs.c +++ b/vecs.c @@ -170,6 +170,7 @@ extern ff_vecs_t enigma_vecs; extern ff_vecs_t vpl_vecs; extern ff_vecs_t teletype_vecs; extern ff_vecs_t jogmap_vecs; +extern ff_vecs_t wintec_tes_vecs; static vecs_t vec_list[] = { @@ -998,6 +999,12 @@ vecs_t vec_list[] = { "Jogmap.de XML format", "xml" }, + { + &wintec_tes_vecs, + "wintec_tes", + "Wintec TES file", + "tes" + }, #endif // MAXIMAL_ENABLED { NULL, diff --git a/wintec_tes.c b/wintec_tes.c new file mode 100644 index 000000000..1201b3c8a --- /dev/null +++ b/wintec_tes.c @@ -0,0 +1,104 @@ +/* + + Wintec tes support. + + Copyright (C) 2010 Robert Lipe, robertlipe@gpsbabel.org + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA + + */ + +#include "defs.h" + +#define MYNAME "wintec_tes" + +static gbfile* fin; + +static void +wintec_tes_rd_init(const char *fname) +{ + fin = gbfopen(fname, "r", MYNAME); +} + +static void +wintec_tes_rd_deinit(void) +{ + gbfclose(fin); +} + +static time_t +wintec_date_to_time(gbuint32 w) +{ + time_t t; + struct tm tm; + memset(&tm, 0, sizeof(tm)); + tm.tm_sec = ((w & 0x0000003f)); + tm.tm_min = ((w & 0x00000fc0) >> 6); + tm.tm_hour = ((w & 0x0001f000) >> 12); + tm.tm_mday = ((w & 0x00370000) >> 17); + tm.tm_mon = ((w & 0x03c00000) >> 22) - 1; + tm.tm_year = ((w & 0xfc000000) >> 26) + 100; + + return mkgmtime(&tm);; +} + +static void +wintec_tes_read(void) +{ + route_head *trk = route_head_alloc(); + track_add_head(trk); + + while (!gbfeof(fin)) { + waypoint *wpt; + gbuint16 flags = gbfgetuint16(fin); + gbuint32 date = gbfgetuint32(fin); + gbint32 latitude = gbfgetint32(fin); + gbint32 longitude = gbfgetint32(fin); + gbint16 alt = gbfgetint16(fin); // Signed. Meters. + + wpt = waypt_new(); + wpt->latitude = latitude / 1.0e7; + wpt->longitude = longitude / 1.0e7; + wpt->creation_time = wintec_date_to_time(date); + // The unit of altitude isn't clear and we have a lot of + // samples with wildly negative values, so ignore those for now. + wpt->altitude = alt; + track_add_wpt(trk, wpt); + } +} + +static +arglist_t wintec_tes_args[] = { + ARG_TERMINATOR +}; + +ff_vecs_t wintec_tes_vecs = { + ff_type_file, + { + ff_cap_none /* waypoints */, + ff_cap_read /* tracks */, + ff_cap_none /* routes */ + }, + wintec_tes_rd_init, + NULL, + wintec_tes_rd_deinit, + NULL, + wintec_tes_read, + NULL, + NULL, + wintec_tes_args, + CET_CHARSET_ASCII, 0 /* ascii is the expected character set */ + /* not fixed, can be changed through command line parameter */ +}; diff --git a/xmldoc/formats/wintec_tes.xml b/xmldoc/formats/wintec_tes.xml new file mode 100644 index 000000000..29c16fd75 --- /dev/null +++ b/xmldoc/formats/wintec_tes.xml @@ -0,0 +1,26 @@ +This format supports Wintec .tec files, such as appear on the +Wintec WBT-202 data logger. + + +The WinTec WBT-202 stores tracks and waypoints on an internal +MICRO-SD Memory card. The log files can be accessed by connecting to an USB +host and setting the device into a mass storage device (MSD) mode. To enter +this mode, attach it to the computer, then hold the power button until the +GPS and Bluetooth LEDs go out. It will then behave like an USB Memory stick. +and individual files containing your tracks will show up on the "disk" with +names ending in .tes. You can use GPSBabel to read these files directly +or copy them to your host computer. + + +Note that this format is for the TES files on the GPS, it has no relationship +to the .TK2 files created by Wintec's Time Machine software for Windows. + + +Despite the physical similarity to the +Wintec WBT-201, this is believed to be a rather +different product. While this GPS probably works fine for +realtime tracking over the bluetooth or +serial lines (once you have appropriate serial drivers), it's expected +to not work with GPSBabel's GPSBabel WBT +Protocol module. + -- 2.30.2